//
//  JPFlunkModel.m
//  JPKY
//
//  Created by 刘刘 on 16/11/14.
//  Copyright © 2016年 Vitas. All rights reserved.
//

#import "JPFlunkModel.h"

@implementation JPFlunkModel

+ (instancetype) flunkModelWithDic:(NSDictionary *)dic {
    return [[self alloc] initWithDic:dic];
}

- (instancetype) initWithDic:(NSDictionary *)dic {
    if (self = [super init]) {
        // KVC 字典转模型,这个不行,因为对象中的数据类型和dic中的数据类型不同
        // KVC 通过字符串名名字找到字符串
        // [self setValuesForKeysWithDictionary:dic];
        self.icon = dic[@"icon"];
        self.name = dic[@"name"];
    }
    return self;
}


@end
